<!DOCTYPE html>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>{{cache("kv_site_name")}}</title>
    <link href="{{asset('admin/css/style.css')}}" rel="stylesheet" type="text/css"/>
    <link href="{{asset('admin/js/toastr/toastr.min.css')}}" rel="stylesheet" type="text/css"/>
    <link href="{{asset('admin/js/laydate/skins/dahong/laydate.css')}}" rel="stylesheet" type="text/css"/>

    <script src="{{asset('admin/js/jquery.min.js')}}"></script>
    <script src="{{asset('admin/js/common.js')}}"></script>
    <script src="{{asset('admin/js/toastr/toastr.min.js')}}"></script>
    <script src="{{asset('admin/js/jquery.form.js')}}"></script>
    <script src="{{asset('admin/js/validate/jquery.validate.min.js')}}"></script>
    <script src="{{asset('admin/js/validate/localization/messages_zh.min.js')}}"></script>

    @yield('head')

    <script type="text/javascript">
        $(function () {
            $('.title').click(function () {     //一级目录展开收缩
                var $ul = $(this).next('ul');
                if ($ul.is(':visible')) {
                    $(this).next('ul').slideUp();
                } else {
                    $(this).next('ul').slideDown();
                }
            });

            //动态计算右侧布局的宽度
            $("#mainContent").width((document.body.clientWidth - 187) + "px");
            window.onresize = function () {
                $("#mainContent").width((document.body.clientWidth - 187) + "px");
            }
        })
    </script>
</head>
<body>
<?php $top_admin = App\Models\Admin::find(session('admin_id')); ?>

@include('admin.top_layout',['top_admin' => $top_admin])

<div style="clear: both;"></div>
<div id="mainMenu">
    @include('admin.menu_layout',['top_admin' => $top_admin])
</div>

<div id="mainContent">
    <div class="place">
        <span>位置：</span>
        <ul class="placeul">
            <li><a href="#">{{$top_selected}}</a></li>
            <li><a href="#">{{$page_menu}}</a></li>
        </ul>
    </div>
    @yield('content')
</div>
@include('errors.toast')

@yield("footer")
</body>
</html>